jsx3.Class.defineClass(
        "tibco.admin.monitormanage.uicomponents.page.gridInfrastructure.tabContent.nodeOverview.NodeOverview", //the full name of the class to create
        jsx3.lang.Object, //  extends
        [tibco.admin.monitormanage.uicomponents.page.gridInfrastructure.NodeTabInterface], // implements
        function (plugin) {
        
            plugin.instance = null

            plugin.getInstance = function(args) {
                if(!this.instance) {
                    this.instance = new tibco.admin.monitormanage.uicomponents.page.gridInfrastructure.tabContent.nodeOverview.NodeOverview();
                }
                return this.instance;
            }

            plugin.prototype.getNamespace = function() {
               return "tibco.admin";
            }
            
            plugin.prototype.getTabText = function() {
				return tibco.admin.Main.getServer().getDynamicProperty("@MM@general@OverviewTitle");
            	//return "Overview";
            }

            plugin.prototype.loadComponent = function(parent, nodeId) {
                var overviewBlock = tibco.admin.Main.loadUIResource(parent, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/page/gridInfrastructure/tabContent/nodeOverview/components/nodeOverview.xml", true);
                
				var nodeInfoPane = overviewBlock.getDescendantOfName("nodeInfoPane");
       			if(!tibco.admin.monitormanage || !tibco.admin.monitormanage.uicomponents || !tibco.admin.monitormanage.uicomponents.text || !tibco.admin.monitormanage.uicomponents.text.nodeInfo || !tibco.admin.monitormanage.uicomponents.text.nodeInfo.NodeInfo)
               	{ tibco.admin.Main.loadClass("tibco/admin/monitormanage/uicomponents/text/nodeInfo/NodeInfo.js", this.getNamespace()); }
               	var nodeInfoObj = tibco.admin.Main.loadUIResource(nodeInfoPane, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/text/nodeInfo/components/nodeInfo.xml", true);
               	nodeInfoObj.setUpComponent();

               	var nodeStatsTimePane = overviewBlock.getDescendantOfName("timeComparisonPane");
       			if(!tibco.admin.monitormanage || !tibco.admin.monitormanage.uicomponents || !tibco.admin.monitormanage.uicomponents.table || !tibco.admin.monitormanage.uicomponents.table.timeComparison || !tibco.admin.monitormanage.uicomponents.table.timeComparison.nodeStats || !tibco.admin.monitormanage.uicomponents.table.timeComparison.nodeStats.NodeStats)
               	{ tibco.admin.Main.loadClass("tibco/admin/monitormanage/uicomponents/table/timeComparison/nodeStats/NodeStats.js", this.getNamespace()); }
               	var timeCompObj = tibco.admin.Main.loadUIResource(nodeStatsTimePane, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/table/timeComparison/nodeStats/components/nodeStats.xml", true);
               	timeCompObj.setUpComponent();
               	
               	var containersPane = overviewBlock.getDescendantOfName("mainContentTopLeftPane");
       			if(!tibco.admin.monitormanage || !tibco.admin.monitormanage.uicomponents || !tibco.admin.monitormanage.uicomponents.table || !tibco.admin.monitormanage.uicomponents.table.containers || !tibco.admin.monitormanage.uicomponents.table.containers.Containers)
               	{ tibco.admin.Main.loadClass("tibco/admin/monitormanage/uicomponents/table/containers/Containers.js", this.getNamespace()); }
               	var containersTable = tibco.admin.Main.loadUIResource(containersPane, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/table/containers/components/containers.xml", true);
               	containersTable.setUpComponent();

               	var sharedResourcesPane = overviewBlock.getDescendantOfName("mainContentBottomLeftPane");
       			if(!tibco.admin.monitormanage || !tibco.admin.monitormanage.uicomponents || !tibco.admin.monitormanage.uicomponents.table || !tibco.admin.monitormanage.uicomponents.table.sharedResources || !tibco.admin.monitormanage.uicomponents.table.sharedResources.SharedResources)
               	{ tibco.admin.Main.loadClass("tibco/admin/monitormanage/uicomponents/table/sharedResources/SharedResources.js", this.getNamespace()); }
               	var sharedResourcesObj = tibco.admin.Main.loadUIResource(sharedResourcesPane, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/table/sharedResources/components/sharedResources.xml", true);
               	sharedResourcesObj.setUpComponent();

               	var servicesPane = overviewBlock.getDescendantOfName("mainContentRightPane");
       			if(!tibco.admin.monitormanage || !tibco.admin.monitormanage.uicomponents || !tibco.admin.monitormanage.uicomponents.table || !tibco.admin.monitormanage.uicomponents.table.services || !tibco.admin.monitormanage.uicomponents.table.services.Services)
               	{ tibco.admin.Main.loadClass("tibco/admin/monitormanage/uicomponents/table/services/Services.js", this.getNamespace()); }
               	var servicesTable = tibco.admin.Main.loadUIResource(servicesPane, this.getNamespace(), "tibco/admin/monitormanage/uicomponents/table/services/components/services.xml", true);
               	servicesTable.setUpComponent("_MM_infra", tibco.admin.monitormanage.uicomponents.page.gridInfrastructure.GridInfrastructure.servicesScreenId,true);
				tibco.admin.monitormanage.general.PollingHandler.register(tibco.admin.monitormanage.general.PollingHandler.GENERAL_POLLING_HANDLER_ID, servicesTable, servicesTable.updateComponentForGridInfrastructure, tibco.admin.monitormanage.uicomponents.page.gridInfrastructure.GridInfrastructure.nodeScreenId);
				tibco.admin.monitormanage.general.RefreshHandler.register(servicesTable, servicesTable.updateComponentForGridInfrastructure, tibco.admin.monitormanage.uicomponents.page.gridInfrastructure.GridInfrastructure.nodeScreenId);
            }
            
            plugin.prototype.updateComponent = function(nodeId) {
            	// this method does not have to do anything considering the component update is
            	// handled by the components within this component
            	jsx3.log("Node overview tab with nodeId = " + nodeId); 
            }
            
            plugin.prototype.tabClicked = function(objEvent) {
            	tibco.admin.monitormanage.uicomponents.dropdown.timeframe.Timeframe.showTimeframe(tibco.admin.monitormanage.uicomponents.page.gridInfrastructure.GridInfrastructure.nodeScreenId);
        	}

        });